## Controller Python Script ""
##bind container=container
##bind context=context
##bind script=script
##bind subpath=traverse_subpath
##parameters=portal_status_message=None
##title=

if context.aq_parent.portal_type == "EasyArticle":
    # Note: This will add sub objects' SearchableText to the EasyArticle
    # SearchableText and unindexes (hide) all sub objects from the catalog.
    # In this way the article is found and the sub objects not.
    context.aq_parent.reindexObject()
    url = context.aq_parent.absolute_url()
    context.REQUEST.RESPONSE.redirect(url)
else:
    return state.set(status='success')